package com.example.controller;

import com.nanhang.common.util.R;
import com.example.service.ISchoolService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

@Controller
@RestController
@RequestMapping("/school")
public class SchoolController {
    @Autowired
    private ISchoolService departmentService;
    @GetMapping("/list")
    public R list(){
        return R.ok().data("list",departmentService.list());
    }
}
